<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
 <%= stylesheet_link_tag    "application", :media => "all" %>
  <%= javascript_include_tag "application" %>
  <%= csrf_meta_tags %>

<title>
DOVES - Database for Ornithological Verification and Submission</title>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

</head>

<body>

<div id="container">
<div id="title" style="clear: both">
<%= link_to(image_tag("doves-banner.png", :alt=>"DOVES", :class=>"logo"), root_path )%>
        <span class="header">Welcome to DOVES<span>
	</div>
	
	
	<div id="left">
<%= link_to root_path do %><div class="nav">Home</div><% end %>
<%= link_to submissions_path do %><div class="nav">Search</div><% end %>
<%= link_to new_submission_path do %><div class="nav">Submit</div><% end %>

<%=
   link_to_if(!loggedin?, content_tag(:div, "Log In", :class=>"nav"), login_users_path) do
     link_to(content_tag(:div, "Log Out", :class=>"nav"), logout_users_path)
   end
%>

<%=
   link_to_if(!loggedin?, content_tag(:div, "Register", :class=>"nav"), new_user_path) do
     
   end
%>

<%= link_to birds_path do %><div class="nav">Reviewable Birds</div><% end %>


<% if loggedin? %>
<%= link_to user_path(session[:user].id) do %><div class="nav">My Profile</div><% end %>
<% end %>

<% if isadmin? %>
<%= link_to admin_pages_path do %><div class="nav">Admin Tools</div><% end %>
<% end %>

<%=
if isreviewer?
	link_to(content_tag(:div, "Votes", :class=>"nav"), pending_votes_path)
	end
%>

<%= link_to gettingstarted_pages_path do %><div class="nav">Getting Started</div><% end %>

<%= link_to about_pages_path do %><div class="nav">About</div></a><% end %>
</div>

	<div id="content">
	<% if flash[:notice] %>
		<div class="alert alert-info">
			<button type="button" class="close" data-dismiss="alert">&times;</button>
			<span class="notice"><%= flash[:notice] %></span>
		</div>
	<% end %>
    <% if flash[:error] %>
		<div class="alert alert-error">
			<button type="button" class="close" data-dismiss="alert">&times;</button>
			<span class="error"><%= flash[:error] %></span>
		</div>
  <% end %>
  <br />
		<%= yield %>
	</div>

	<div id="footer">
	&copy; CS411 Blue Team 2013.  :M	
	<%= link_to sitemap_pages_path do %>Site Map<% end %>
	</div>

</div>
</body>
</html>